Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
"....has no exported member"-error in importing component (Angular)

i am making a component called headerComponent and importing in app.component.ts but getting website/src/app/header/app.headerComponent"' has no exported member 'headerComponent' error my app.headerComponent.ts code is as follow

import { Component } from '@angular/core';

@Component({
 selector: 'header',
 templateUrl: './app/header/header.html'
 })
 export class headerComponent {}

and app.component.ts code is as follows

import { Component } from '@angular/core';

 import { headerComponent } from './header/app.headerComponent';

 @Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
   })
   export class AppComponent {
   }
about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You need to add the component to your module.ts

import { headerComponent } from './header/app.headerComponent';

then,

@NgModule({
  imports: [
  ],
  declarations: [
    headerComponent 
  ]
about 4 years ago · Santiago Trujillo Report

0

Fixed similar error by updating the Typescript version

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!